/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.yournamehere.server;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import org.hibernate.Query;
import org.hibernate.Session;
import org.yournamehere.Hwords;
import org.yournamehere.NewHibernateUtil;

import org.yournamehere.client.GWTServiceHello;

/**
 *
 * @author Marat
 */
public class GWTServiceHelloImpl extends RemoteServiceServlet implements GWTServiceHello {

    public String getHello() {
        // Do something interesting with 's' here on the server.
        Session session = NewHibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();
        Hwords h=new Hwords();
        h.setId(1);
        h=(Hwords) session.load(Hwords.class, h.getId());
        return h.getWord();
    }
}
